<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta content="IE=EmulateIE7" http-equiv="X-UA-Compatible">
<title><!--{def($itemdesc[pagetitle],$item.itemname)}-->--<!--{$mallname}--></title>
<meta name="keywords" content="<!--{def($itemdesc[pagekeywords],$mallkeywords)}-->" />
<meta name="description" content="<!--{def($itemdesc[pagedesc],$malldesc)}-->" />
<!--{include(file='static.html')}-->
</head>
<body>
<!--{include(file='head.html')}-->
<link rel="stylesheet" href="template/jslib/jqzoom/jquery.jqzoom.css" type="text/css">
<script type="text/javascript" src="template/jslib/jqzoom/jquery.jqzoom-core.js"></script>
<script type="text/javascript" src="template/jslib/easyslider/easyslider.js"></script>
<script type="text/javascript" src="template/front/<!--{$tpl}-->/js/item.js"></script>
<!--主体内容-->
<div class="container">
	<div class="pro_left">
		<div class="libiao_menu">
			<!--{include(file='left_cat.html')}-->
		</div>
		<!--{if $relations}-->
		<div class="libiao_item">
			<h1>相关商品</h1>
			<ul>
			<!--{foreach $relations rel}-->
			<li>
				<p>
					<a href="<!--{url('index','item','index','itemid=$rel[fitemid]')}-->" target="_blank"><img src="<!--{$rel.itemimg}-->_50x50.jpg" width="50" height="50"/></a>
				</p>
				<p>
					<a href="<!--{url('index','item','index','itemid=$rel[fitemid]')}-->" target="_blank"><!--{$rel.itemname}--></a>
				</p>
				<p class="text_red">价格：￥<!--{getPrice($rel.price)}--></p>
			</li>
			<!--{/foreach}-->
			</ul>
		</div>
		<!--{/if}-->

		<!--{if $historylist}-->
		<div class="libiao_item">
			<h1>浏览历史</h1>
			<ul>
			<!--{foreach $historylist history}-->
			<li>
				<p>
					<a href="<!--{url('index','item','index','itemid=$history[itemid]')}-->">
						<img src="<!--{$history.itemimg}-->_50x50.jpg" width="50" height="50"/>
					</a>
				</p>
				<p>
					<a href="<!--{url('index','item','index','itemid=$history[itemid]')}-->">
						<!--{$history.itemname}-->
					</a>
				</p>
				<p class="text_red">价格：￥<!--{getPrice($history.price)}--></p>
			</li>
			<!--{/foreach}-->
			</ul>
		</div>
		<!--{/if}-->
	</div>
	<div class="pro_right">
		<div class="pro_info">
			<div class="pro_pic">
				<a class="pic_box" id="pic" href="<!--{$item.itemimg}-->">
					<img src="<!--{$item.itemimg}-->_310x310.jpg" width="310" height="310" id="picimg"/>
				</a>
				<div class="clear"></div>
				<div id="slideout">
					<div id="slide">
						<ul>
							<!--{foreach $itemimgs itemimg}-->
							<li><a href="javascript:void(0)"><img src="<!--{$itemimg.imgpath}-->_50x50.jpg" width="50" height="50"/></a></li>
							<!--{/foreach}-->
						</ul>
					</div>
					<span id="prevBtn"><a href="javascript:void(0)" onclick=""></a></span>
					<span id="nextBtn"><a href="javascript:void(0)" onclick=""></a></span>
				</div>
				<div id="itemv2">
					<span class="left">
						<b></b>
						<a href="<!--{url('index','item','bigimg','itemid=$itemid')}-->" target="_blank">点击看大图</a>
					</span>
					<span style="margin-left:23px;float:left;">点击分享</span>
					<span class="itemshare mid">
						<a href="javascript:void(0)" class="tsina"  onclick="Item.share('tsina');return false;"  title="推荐到新浪微博"></a>
						<a href="javascript:void(0)" class="tqq"    onclick="Item.share('tqq');return false;"	  title="推荐到腾讯微博"></a>
						<a href="javascript:void(0)" class="qq"	    onclick="Item.share('qzone');return false;"  title="推荐到QQ空间"></a>
						<a href="javascript:void(0)" class="kaixin" onclick="Item.share('kaixin');return false;" title="推荐到开心网"></a>
						<a href="javascript:void(0)" class="msn"    onclick="Item.share('msn');return false;"	  title="推荐到msn"></a>
						<a href="javascript:void(0)" class="renren" onclick="Item.share('renren');return false;" title="推荐到人人"></a>
						<a href="javascript:void(0)" class="douban" onclick="Item.share('douban');return false;" title="推荐到douban"></a>
					</span>
				</div>
			</div>
			<div class="pro_text">
				<h3><!--{$item.itemname}--></h3>
				<ul>
					<!--{if $dis || $tuan}-->
						<!--{if $dis}-->
						<li>限时打折：￥<span class="font_color" id="disprice"><!--{$pricestr}--></span>
							剩余时间：<span id="timeleft"></span>
						</li>
						<!--{elseif $tuan}-->
						<li>团购价：￥<span class="font_color" id="tuanprice"><!--{$pricestr}--></span>
							剩余时间：<span id="timeleft"></span>
						</li>
						<!--{/if}-->
						<script type="text/javascript">
							var endtime = "<!--{if $dis}--><!--{$dis.endtime}--><!--{elseif $tuan}--><!--{$tuan.endtime}--><!--{/if}-->";
							var curtime = "<!--{$time}-->";
							function setTime() {
								curtime ++;
								var diff = endtime - curtime;
								var day		= Math.floor(diff / 86400),
									hour	= Math.floor((diff - day * 86400) / 3600),
									minute	= Math.floor((diff - day * 86400 - hour * 3600) / 60),
									second	= Math.floor(diff - day * 86400 - hour * 3600 - minute * 60);
								$("#timeleft").html("<i>"+day+"</i>天<i>"+hour+"</i>时<i>"+minute+"</i>分<i>"+second+"</i>秒");	
							};
							setInterval(setTime,1000);
						</script>
						<li class="midline">价格：￥<span class="font_color" id="price"><!--{getPrice($item.price)}--></span></li>
					<!--{else}-->
						<li>价格：￥<span class="font_color" id="price"><!--{$pricestr}--></span>
							<!--{if $item.pnotify}-->
							（<a href="javascript:void(0)"  class="normala" onclick="Product.addNotify('downprice')">降价通知</a>）
							<!--{/if}-->
							<!--{if $item.pnotify}-->
							（<a href="javascript:void(0)" class="normala"  onclick="Product.addComprice()">价格举报</a>）
							<!--{/if}-->
						</li>
					<!--{/if}-->
					<!--{if $item.mkprice}-->
					<li class="midline">原价：￥<!--{getPrice($item.mkprice)}--></li>
					<!--{/if}-->
					<li>编号：<!--{$item.bn}--></li>
					<li>浏览：<!--{$item.view+1}--></li>
					<li>上架时间：<!--{date('m月d日',$item.created)}--></li>
				</ul>
				<!--{if $gifts}-->
					<div class="giftouter">
						<span class="gifttitle">赠品：</span>
						<div class="giftlist">
							<!--{foreach $gifts gift}-->
								<div class="gift">
									<a href="<!--{url('index','item','index','itemid=$gift[gitemid]')}-->" class="giftleft" target="_blank"><img src="<!--{$gift.gitemimg}-->" width="25" height="25" /></a>
									<a href="<!--{url('index','item','index','itemid=$gift[gitemid]')}-->" class="giftright" target="_blank">
										<!--{$gift.gitemname}-->
									</a>
									<span class="giftnum">x <!--{$gift.num}--></span>
								</div>
								<div class="clear"></div>
							<!--{/foreach}-->
						</div>
					</div>
					<div class="clear"></div>
				<!--{/if}-->
				<!--{if $item.status == 1}-->
				<div class="buyinfo">
					<p class="spechint none">
						请选择相关属性
						<a href="javascript:void(0)" onclick='Product.hideHint();return false;'>关闭</a>
					</p>
					<div class="sku" <!--{if !$itemspecs}-->style="padding-top:150px;"<!--{/if}-->>
						<!--{if $itemspecs}-->
						<!--{foreach $specs k spec}-->
						<dl class="clear" >
							<dt><!--{$spec.name}-->：</dt>
							<dd>
								<ul class="sku<!--{$spec.type}-->" id="spec_<!--{$spec.specid}-->">
									<!--{if $spec.type == 'pic'}-->
										<!--{foreach $itemspecs[$k][sel] specvalid}-->
											<!--{if in_array($specvalid,$thespecs[$spec[specid]])}-->
												<li title="<!--{$itemspecs[$k][text][$specvalid]}-->">
													<!--{if $itemspecs[$k][pic][$specvalid]}-->
														<a href="javascript:void(0)" onclick="Product.select(this,'pic');return false;" id="specval_<!--{$specvalid}-->" style="background:url('<!--{$itemspecs[$k][pic][$specvalid]}-->_50x50.jpg')">
															<span style="text-indent:-9999px"><!--{$itemspecs[$k][text][$specvalid]}--></span>
														</a>
													<!--{else}-->
														<a href="javascript:void(0)" onclick="Product.select(this,'text');return false;" id="specval_<!--{$specvalid}-->">
															<span><!--{$itemspecs[$k][text][$specvalid]}--></span></a>
													<!--{/if}-->
												</li>
											<!--{/if}-->
											<!--{/foreach}-->
									<!--{elseif $spec.type == 'text'}-->
										<!--{foreach $itemspecs[$k][sel] specvalid}-->
											<!--{if in_array($specvalid,$thespecs[$spec[specid]])}-->
											<li title="<!--{$itemspecs[$k][text][$specvalid]}-->">
												<a href="javascript:void(0)" onclick="Product.select(this,'text');return false;" id="specval_<!--{$specvalid}-->"><!--{$itemspecs[$k][text][$specvalid]}--></a>
											</li>
											<!--{/if}-->
										<!--{/foreach}-->
									<!--{/if}-->
								</ul>
							</dd>
						</dl>
						<!--{/foreach}-->
						<!--{/if}-->
						
						<dl class="clear">
							<dt>数量：</dt>
							<dd>
								<span><a href="javascript:void(0)" onclick="Item.opernum('jian');return false;"><img src="template/front/<!--{$tpl}-->/images/jian.gif" class='mid'/></a></span> 
								<input name="buynum" id="buynum" value="1" type="text" size="4" style="text-align:center;" autocomplete="off"/> 
								<span><a href="javascript:void(0)" onclick="Item.opernum('jia');return false;"><img src="template/front/<!--{$tpl}-->/images/jia.gif" class='mid'/></a></span> 件
							   库存: <span id="inventory"><!--{$item.inventory}--></span>件
							 </dd>
						</dl>
						<div class="buybutton">
							<input type="button" class="button_car	  <!--{if !$item.inventory}-->none<!--{/if}-->"   onclick="Product.addCart()"/>
							<input type="button" class="button_notice <!--{if $item.inventory}-->none<!--{/if}-->"	  onclick="Product.addNotify('nostock')" />
							<input type="button" class="button_favor" onclick="Product.addFavor()"/>
						</div>
					</div>
					<div class="clear"></div>
					<!--{if $man}-->
					<div class="promotion">
						<h1>促销信息</h1>
						<ul>
							<li><!--{$man['subject']}--></li>
						</ul>
					</div>
					<!--{/if}-->
				</div>
				<!--{elseif $item.status == 2}-->
				<div><span class='font_color'>该商品已经下架</span></div>
				<!--{/if}-->
			</div>
			<div class="clear"></div>
		</div>
		<div class="clear"></div>
		<!--{if $meal}-->
		<div class="p_group">
			<h3>搭配套餐</h3>
			<div class="p_group_c">
				<div class="p_group_r">
					<p style="margin-bottom:10px;color:#0000FF"><b>购买最佳组合</b></p>
					<p>套餐价格：<span class="text_red">￥<!--{getPrice($meal.price)}--></span></p>
					<p>原价：￥<!--{getPrice($meal.oldprice)}--></p>
					<p>
						<a href="<!--{url('index','meal','index','mealid=$meal[mealid]')}-->" target="_blank">
							<input type="button" class="o_button" value="查看套餐"/>
						</a>
					</p>
				</div>
				<div class="p_group_l">
					<ul>
						<li>
							<p><img src="<!--{$item.itemimg}-->_160x160.jpg" width="120" height="120" /></p>
							<p><!--{$item.itemname}--></p>
						</li>
						<li class="img"><img src="template/front/<!--{$tpl}-->/images/add.gif" /></li>
						<!--{foreach $meal["items"] mealitem}-->
						<li>
							<p>
								<a href="<!--{url('index','item','index','itemid=$mealitem[itemid]')}-->" target="_blank"><img src="<!--{$mealitem['itemimg']}-->_160x160.jpg" width="120" height="120"/></a></p>
							<p>
								<a href="<!--{url('index','item','index','itemid=$mealitem[itemid]')}-->" target="_blank"><!--{$mealitem.itemname}--></a>
							</p>
							<p> <span class="text_red">￥<!--{getPrice($mealitem.price)}--></span></p>
						</li>
						<!--{/foreach}-->
					</ul>
					<div class="clear"></div>
				</div>
			</div>
		</div>
		<!--{/if}-->
		
		<div class="pro_content">
			<div class="pro_top_lable">
				<ul>
					<li class="on"><a href="javascript:void(0)" onclick="Item.tab('info',this);return false;">产品详情</a></li>
					<li><a href="javascript:void(0)"  onclick="Item.tab('sale',this);return false;">销售记录</a></li>
					<li><a href="javascript:void(0)"  onclick="Item.tab('comment',this);return false;">评论</a></li>
					<li><a href="javascript:void(0)"  onclick="Item.tab('qa',this);return false;">商品咨询</a></li>
				</ul>
				<div class="clear"></div>
			</div>
			<!--产品详情-->
			<div class="pro_m_info" style="display:" id="infotab">
				<!--{if $itemproperty}-->
				<div class="pro_top_box">
					<ul>
						<!--{foreach $itemproperty property}-->
								<li><!--{$property['propertyname']}-->：<!--{$property['propertyvalue']}--></li>
						<!--{/foreach}-->
					</ul>
					<div class="clear"></div>
				</div>
				<!--{/if}-->
				<div class="pro_p">
					<!--{$itemdesc.itemdesc}-->
				</div>
			</div>
			<!--产品详情 end-->
			<!--销售记录-->
			<div class="pro_m_info"  id="saletab" style="display:none;">
				<div id="forsale" class="pro_jilu"></div>
			</div>
			<!--销售记录 end-->
			<!--评论-->
			<div class="pro_m_info" id="commenttab" style="display:none;">
			  <div id="forcomment"></div>
			  <div class="pinglun_input">
				<div class="p1"><b>我要评论</b><span>(购买商品之后才能评论)</span></div>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
				  <tr>
					<td align="right" valign="top">评论内容：</td>
					<td>
						<textarea id="commentcont" name="commentcont" rows="8" class="pl_input" onfocus="Item.removeborder(this)"></textarea>
					</td>
				  </tr>
				  <tr>
					<td align="right">综合评分：</td>
					<td>
						<input type="radio" name="score" value="5" class="left" checked /> 
							<span class="star5"></span>
						<input type="radio" name="score" value="4" class="left"/> 
							<span class="star4"></span>
						<input type="radio" name="score" value="3" class="left"/> 
							<span class="star3"></span>
						<input type="radio" name="score" value="2" class="left" /> 
							<span class="star2"></span>
						<input type="radio" name="score" value="1" class="left"/> 
							<span class="star"></span>
					</td>
				  </tr>
				  <tr>
					<td>&nbsp;</td>
					<td>
					  <input type="button" class="o_button needlogin" value="提 交" onclick="Item.saveComment(this)"/></td>
				  </tr>
				</table>
			  </div>
			</div>
			<!--评论 end-->
			<!--咨询-->
			<div class="pro_m_info"  id="qatab" style="display:none;">
			<div id="forqa"></div>
			  <div class="pinglun_input">
				<div class="p1"><b>我要咨询</b><span>(如购买过程中有任何疑问，欢迎向我们咨询)</span></div>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
				  <tr>
					<td align="right" valign="top">咨询内容：</td>
					<td>
						<textarea id="qacont" name="qacont" rows="8" class="pl_input" onfocus="Item.removeborder(this)"></textarea>
					</td>
				  </tr>
				   <tr>
						<td align="right" valign="top">验证码：</td>
						<td>
							<input type="text" id="qaseccode" name="qaseccode" size="10" onkeyup="Item.upper(this)" autocomplete="off" onfocus="Item.showseccode('qaseccode')"/>
							<span class="none">
								<img src="util.php?action=seccode&t=<!--{$time}-->" id="qaseccodeimg" class="mid"/>
								<span class="hand" onclick="Item.chgimg('qaseccodeimg')">换一张</span>
							</span>
						</td>
				  </tr>
				  <tr>
					<td>&nbsp;</td>
					<td>
					  <input type="button" class="o_button needlogin" value="提 交" onclick="Item.saveQa(this)"/></td>
				  </tr>
				</table>
			  </div>
			</div>
			<!--咨询 end-->
		</div>
	</div>
	<div class="clear"></div>
</div>
<!--主体内容 end-->
<!--{include(file='foot.html')}-->
</body>
</html>
<script type="text/javascript">
$(function() {
	Item.init(
			{
			share : {
				title	:"<!--{$item.itemname}-->",
				content	:"<!--{$share}-->",
				img		:"<!--{if cstrpos($item.itemimg,'http://')}--><!--{$item.itemimg}--><!--{else}--><!--{$weburl}--><!--{$item.itemimg}--><!--{/if}-->",
				itemurl	:"<!--{$weburl}-->?<!--{$item.itemid}-->"
			},
			itemid:"<!--{$itemid}-->",
			url:"<!--{url('index','item','getother')}-->",
			qaurl:"<!--{url('index','item','saveqa')}-->",
			commenturl:"<!--{url('index','item','savecomment')}-->"
		}
	);
	Product.init(
		{
			itemid		:'<!--{$itemid}-->',
			productstr	:'<!--{def($productstr)}-->',
			specnum		:'<!--{if $itemspecs}--><!--{count($specs)}--><!--{else}-->0<!--{/if}-->',
			favorurl	:"<!--{url('index','item','addfavor')}-->",
			notifyurl	:"<!--{url('index','item','addnotify')}-->",
			compriceurl	:"<!--{url('index','item','comprice')}-->",
			carturl		:"<!--{url('index','cart','addCart')}-->",
			dis			:'<!--{if ($dis)}-->1<!--{else}-->0<!--{/if}-->',
			tuan		:'<!--{if ($tuan)}-->1<!--{else}-->0<!--{/if}-->'
		}
	);
	Img.init();
<!--{if (!$.session.uid)}-->
	$(".needlogin").each(function(){
		var $this = $(this);
		$this.click(function(){
			$.tbox.popup("<!--{url('index','user','login','ajax=1')}-->");
			return false;
		});
	});
<!--{/if}-->
});
</script>